# frozen_string_literal: true

# Authorisation is checked in the resolver.
# rubocop: disable Graphql/AuthorizeTypes

module Types
  module Ai
    module Prompt
      class ExplainVulnerabilityPromptType < AiPromptType
        graphql_name 'ExplainVulnerabilityPrompt'

        field :presubmission_checks, PresubmissionCheckResultsType,
          null: false,
          description: "An object containing booleans. Each booolean indicates the result of a presubmission check: " \
                       "`true` for passed, and `false` for failed."
        field :prompt_with_code, GraphQL::Types::String,
          null: true,
          description: "AI text prompt generated using the vulnerability's information, including the vulnerable code."
        field :prompt_without_code, GraphQL::Types::String,
          null: true,
          description: "AI text prompt generated using the vulnerability's information, excluding the vulnerable code."
      end
    end
  end
end

# rubocop: enable Graphql/AuthorizeTypes
